#pragma once

#include <WzDataType.h.>

class MovementChecker
{
public:
	MovementChecker(void);
	~MovementChecker(void);

	VOID			Init();
	VOID			Reset();
	VOID			SetMoveSpeed( float fMoveSpeed, WzVector wvCurPos );
	BOOL			AddMovement( WzVector wvCurPos );
	inline DWORD	GetTotalTick() { return GetTickCount() - m_dwFirstMovedTick; }
	inline float	GetMaxDistance() { return m_fMoveSpeed * GetTotalTick() * 0.001f; }

private:
	BOOL			IsLegal();
	BOOL			m_bFirstMove;
	DWORD			m_dwFirstMovedTick;
	DWORD			m_dwLastMovedTick;
	float			m_fMoveSpeed;
	float			m_fTotalMovement;
	float			m_fMaxDistance;
	WzVector		m_wvPrevFromPos;
	DWORD			m_dwPrevTickCount;
};
